#include "mainwindow.h"
#include "ui_mainwindow.h"

MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    ui->setupUi(this);

    PositionWidget *positionwidget = new PositionWidget();
    setCentralWidget(positionwidget);

    setupDock();

    this->SetupConnections();
}

MainWindow::~MainWindow()
{
    delete ui;
}

void MainWindow::SetupConnections(void) {

}

void MainWindow::setupDock(void) {
    QDockWidget *dock = new QDockWidget("Tools", this);
    dock->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea);

    QToolBox * toolBox = new QToolBox(dock);
    dock->setWidget(toolBox);

    addDockWidget(Qt::LeftDockWidgetArea, dock);

    freqToCentWidget *centWidget = new freqToCentWidget();
    freqToNoteWidget *noteWidget = new freqToNoteWidget();

    toolBox->addItem(centWidget, "Freq to Cent");
    toolBox->addItem(noteWidget, "Freq to Note");

    dock->setMinimumWidth(250);
}
